package cn.pdd;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Teacher {
    private String name;
    private Lesson [] lessons;
    private List<Teacher> student=new ArrayList<>();

    public Teacher() {
    }

    public Teacher(String name, Lesson[] lessons, List<Teacher> student) {
        this.name = name;
        this.lessons = lessons;
        this.student = student;
    }

    public Teacher(String name) {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Lesson[] getLessons() {
        return lessons;
    }

    public void setLessons(Lesson[] lessons) {
        this.lessons = lessons;
    }

    public List<Teacher> getStudent() {
        return student;
    }

    public void setStudent(List<Teacher> student) {
        this.student = student;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", lessons=" + Arrays.toString(lessons) +
                ", student=" + student +
                '}';
    }

    public void teacher() {

        for (int i=0;i<lessons.length; i++){
            System.out.println(name+"教"+ lessons[0]);
        }

    }
}
